package com.qidian.mes.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qidian.mes.excel.MachineryStatusConverter;

import java.util.Date;

/**
 * @Author 陆雯城
 * @Description
 * @Time 2024-04-14 14:29
 */
public class Machinery {
    @ExcelProperty(value = "设备ID", index = 0)
    private Long machineryId; // 设备ID - 主键
    @ExcelProperty(value = "设备编码", index = 1)
    private String machineryCode; // 设备编码
    @ExcelProperty(value = "设备名称", index = 2)
    private String machineryName; // 设备名称
    @ExcelProperty(value = "设备品牌", index = 3)
    private String machineryBrand; // 品牌
    @ExcelProperty(value = "规格型号", index = 4)
    private String machinerySpec; // 规格型号
    @ExcelProperty(value = "设备类型", index = 5)
    private String machineryTypeName; // 设备类型名称
    @ExcelProperty(value = "所属车间", index = 6)
    private String workshopName; // 所属车间名称
    @ExcelProperty(value = "设备状态", index = 7, converter = MachineryStatusConverter.class)
    private Integer status; // 设备状态 - 1停机 2开机 99删除
    @ExcelProperty(value = "备注", index = 8)
    private String remark; // 备注
    @ExcelProperty(value = "创建时间", index = 9)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime; // 创建时间
    @ExcelProperty(value = "更新时间", index = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifyTime; // 更新时间

    public Machinery() {
    }

    public Machinery(Long machineryId, String machineryCode, String machineryName, String machineryBrand, String machinerySpec, String machineryTypeName, String workshopName, Integer status, String remark, Date createTime, Date modifyTime) {
        this.machineryId = machineryId;
        this.machineryCode = machineryCode;
        this.machineryName = machineryName;
        this.machineryBrand = machineryBrand;
        this.machinerySpec = machinerySpec;
        this.machineryTypeName = machineryTypeName;
        this.workshopName = workshopName;
        this.status = status;
        this.remark = remark;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
    }

    public Long getMachineryId() {
        return machineryId;
    }

    public void setMachineryId(Long machineryId) {
        this.machineryId = machineryId;
    }

    public String getMachineryCode() {
        return machineryCode;
    }

    public void setMachineryCode(String machineryCode) {
        this.machineryCode = machineryCode;
    }

    public String getMachineryName() {
        return machineryName;
    }

    public void setMachineryName(String machineryName) {
        this.machineryName = machineryName;
    }

    public String getMachineryBrand() {
        return machineryBrand;
    }

    public void setMachineryBrand(String machineryBrand) {
        this.machineryBrand = machineryBrand;
    }

    public String getMachinerySpec() {
        return machinerySpec;
    }

    public void setMachinerySpec(String machinerySpec) {
        this.machinerySpec = machinerySpec;
    }

    public String getMachineryTypeName() {
        return machineryTypeName;
    }

    public void setMachineryTypeName(String machineryTypeName) {
        this.machineryTypeName = machineryTypeName;
    }

    public String getWorkshopName() {
        return workshopName;
    }

    public void setWorkshopName(String workshopName) {
        this.workshopName = workshopName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public String toString() {
        return "Machinery{" +
                "machineryId=" + machineryId +
                ", machineryCode='" + machineryCode + '\'' +
                ", machineryName='" + machineryName + '\'' +
                ", machineryBrand='" + machineryBrand + '\'' +
                ", machinerySpec='" + machinerySpec + '\'' +
                ", machineryTypeName='" + machineryTypeName + '\'' +
                ", workshopName='" + workshopName + '\'' +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                '}';
    }
}
